package xyz.ljcc.ccmt.model.base;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.annotation.JsonFormat;


/**
 * 系统菜单表
 * @author liucan
 *
 */
@Entity
@Table(name="SYS_OPERATIONS")
public class Operation implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="OPERATION_ID")
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer operationId;  // 主键ID
	
	@Column(name="P_OPERATION_ID")
	private Integer parentOperationId;  // 父标题ID
	
	@Column(name="OPERATION_NAME")
	private String operationName;  // 菜单名称
	
	@Column(name="OPERATION_URL")
	private String operationUrl;    // 菜单请求地址
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")    // 创建时间
	private Date createTime;
	
	private String creator;  // 创建者
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="UPDATE_TIME")
	private Date updateTime;
	
	private String updater;
	
	private Integer active;  // 是否启用
	
	@Column(name="DEPT_SHOW")
	private Integer deptShow; // 科室列表是否隐藏（1显示  0隐藏）
	
	@Column(name="PAT_SHOW")
	private Integer patShow;  // 患者列表是否隐藏 （1显示  0隐藏）
	
	@Column(name="SORT_INDEX")
	private Integer sortIndex;  // 排序号

	public Integer getDeptShow() {
		return deptShow;
	}

	public void setDeptShow(Integer deptShow) {
		this.deptShow = deptShow;
	}

	public Integer getPatShow() {
		return patShow;
	}

	public void setPatShow(Integer patShow) {
		this.patShow = patShow;
	}

	public Integer getSortIndex() {
		return sortIndex;
	}

	public void setSortIndex(Integer sortIndex) {
		this.sortIndex = sortIndex;
	}

	public Integer getOperationId() {
		return operationId;
	}

	public void setOperationId(Integer operationId) {
		this.operationId = operationId;
	}

	public Integer getParentOperationId() {
		return parentOperationId;
	}

	public void setParentOperationId(Integer parentOperationId) {
		this.parentOperationId = parentOperationId;
	}

	public String getOperationName() {
		return operationName;
	}

	public void setOperationName(String operationName) {
		this.operationName = operationName;
	}

	public String getOperationUrl() {
		return operationUrl;
	}

	public void setOperationUrl(String operationUrl) {
		this.operationUrl = operationUrl;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getUpdater() {
		return updater;
	}

	public void setUpdater(String updater) {
		this.updater = updater;
	}

	public Integer getActive() {
		return active;
	}

	public void setActive(Integer active) {
		this.active = active;
	}

	@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}
